#include <stdio.h>

int arr[5] = {5, 4, 3 ,2, 1};

int main() {
    int len = sizeof(arr) / sizeof(int);

    for (int i = 0; i < len - 1; i++) {
        for (int j = 0; j < len - 1- i; j++) {
            int temp = arr[j];
            arr[j] = arr[j + 1];
            arr[j + 1] = temp;
        }
    }

    for (int i = 0; i < len; i++) {
        printf("%d\n", arr[i]);
    }

    return 0;
}